<?php
/**
 * 获取年龄
 * @param $birth 日期时间戳
 * @return float
 */
function getAge($birth){
    $today = time();
    $diff = floor(($today-$birth)/86400/365);
    return $diff;
}

function sortMessage($a,$b){
    if($a['time']==$b['time']){
        return 0;
    }
    return ($a['time']>$b['time'])?-1:1;
}
